extends layout

block content
	h1.text-center Register
	p.text-center Please register using the form below.

	main.container
		.row
			.col-md-8.col-md-offset-2.error
			if errors && errors.length > 0
				.alert.alert-danger
					ul.mb-0
						each error in errors
							li #{error.msg}

		.row
			form(method= 'post', action='/api/users/register', enctype = 'multipart/form-data')
				.form-group
					label Name *
					input.form-control(name='name', type='text', placeholder='Enter Name', value=formData ? formData.name : '', required)
				.form-group
					label Email *
					input.form-control(name='email', type='email', placeholder='Enter Email', value=formData ? formData.email : '', required)
				.form-group
					label Password *
					input.form-control(name='password', type='password', placeholder='Enter Password (min 6 chars, must contain uppercase, lowercase and number)', required)
				.form-group
					label Role *
					select.form-control(name='role_id',required)
						option(value=1) Admin
						option(value=2) User
						option(value=3) Visitor

				input.btn.btn-primary(name='submit', type='submit', value='Register')
